﻿using NLog;
using System;
using System.Threading;
class Program
{
    private static Logger logger = LogManager.GetCurrentClassLogger();
    static void Main()  
    {
        logger.Info("这是一条信息日志");
        //try
        //{
        //    // 模拟可能出错的代码
        //    int result = 10 / 0;
        //}
        //catch (Exception ex)
        //{
        //    logger.Error(ex, "发生了一个错误");
        //}
        Thread.Sleep(1000);
    }
}
